﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div class="container">
            <div class="form-group">
                姓名：<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br/>
                密码：<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br/>
                邮箱：<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><br/>
                介绍：<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox><br/>
                <asp:Button ID="Button2" runat="server" Text="提交" OnClick="Button2_Click" />
            </div>
            <br/><br/>
            <div class="form-group">
                姓名：<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
                <asp:Button ID="Button1" runat="server" Text="搜索" OnClick="Button1_Click" />


        </div>

        <div>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="stu_id" DataSourceID="SqlDataSource2" AllowPaging="True" AllowSorting="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
                <Columns>
                    <asp:BoundField DataField="stu_id" HeaderText="学号" InsertVisible="False" ReadOnly="True" SortExpression="stu_id" />
                    <asp:BoundField DataField="stu_name" HeaderText="姓名" SortExpression="stu_name" />
                    <asp:CheckBoxField DataField="gender" HeaderText="性别" SortExpression="gender" />
                    <asp:BoundField DataField="email" HeaderText="邮箱" SortExpression="email" />
                    <asp:BoundField DataField="intro" HeaderText="介绍" SortExpression="intro" />
                    <asp:BoundField DataField="head_image" HeaderText="头像" SortExpression="head_image" />
                    <asp:BoundField DataField="role_id" HeaderText="角色" SortExpression="role_id" />
                    <asp:BoundField DataField="password" HeaderText="密码" SortExpression="password" />
                    <asp:CommandField ShowEditButton="True" HeaderText="编辑" />
                    <asp:CommandField ShowDeleteButton="True" HeaderText="删除" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:Student_dbConnectionString2 %>" SelectCommand="SELECT * FROM [StudentInfo]"></asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Student_dbConnectionString %>" SelectCommand="SELECT * FROM [StudentInfo]"></asp:SqlDataSource>
        </div>
    </form>
</body>
</html>
